package org.example.zpqy.repository;


import org.example.zpqy.bean.CornGround;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface CornGroundRepository extends JpaRepository<CornGround, Long> {
    // 查询所有数据并按id排序（确保顺序一致）
    @Query("SELECT a FROM CornGround a ORDER BY a.id ASC")
    List<CornGround> findAllOrderedById();
}